/**
 * Project: springyounger.lottey.web
 * 
 * File Created at 2009-12-29
 * $Id$
 * 
 * Copyright 2009 Zjut Croporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Zjut Edu. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Zjut Edu.
 */
package com.springyouner.lottery.admin;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import com.springyounger.lottery.dal.dataobject.User;
import com.springyounger.lottery.service.admin.UserService;

/**
 * TODO Comment of SignonController
 * 
 * @author Administrator
 */
public class SignonController implements Controller {

    private UserService userService;

    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        String userid = request.getParameter("userid");
        User user = userService.getUser(userid);

        return new ModelAndView("index", "user", user);
    }

    /**
     * @param userService the userService to set
     */
    public void setUserService(UserService userService) {
        this.userService = userService;
    }
}
